<?php 
/**
*	客户端
*/
class indexClassAction extends Action
{

	public $deflogin 	= '?m=login&d=reim';
	
	
	public function defaultAction()
	{
		$cnum = $this->get('cnum');
		$adminname = $this->adminrs['name'];
		if(isempt($cnum)){
			$cnum = $this->adminrs['defcid'];
			if($cnum=='0'){
				$cnum 	= '';
				$defcid = m('usera')->getmou('cid', '`uid`='.$this->adminid.' and `status`=1');
				if(!isempt($defcid))$cnum = $defcid;
			}
		}
		$admintype = 0;
		if(!isempt($cnum)){
			$this->showCompany($cnum);
			$this->title = $this->companyinfo['name'];
			$logo = $this->companyinfo['logo'];
			if(isempt($logo))$logo = 'images/logo.png';
			$this->assign('logo', $logo);
			if($this->companyinfo['uid']==$this->adminid)$admintype = 1;
			if(arrvalue($this->userainfo,'type')=='1')$admintype = 1;
			$adminname = arrvalue($this->userainfo,'name');
		}else{
			$this->assign('logo', 'images/logo.png');
		}
		$this->assign('admintype', $admintype);
		$this->assign('adminname', $adminname);
	}
	
}